package com.fary.context.support;

import com.fary.core.SpringException;
import com.fary.context.ApplicationContext;
import com.fary.core.io.Resource;


public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {

    private Resource[] configResources;


    public ClassPathXmlApplicationContext(String configLocation) throws SpringException {
        this(new String[]{configLocation}, true, null);
    }

    public ClassPathXmlApplicationContext(String[] configLocations, boolean refresh, ApplicationContext parent) throws SpringException {
        super(parent);
        setConfigLocations(configLocations);
        if (refresh) {
            refresh();
        }
    }

    @Override
    protected Resource[] getConfigResources() {
        return this.configResources;
    }

}